package edu.rmit.domain;

import java.io.Serializable;
import java.util.Calendar;

/**
 * This class represent an interesting group which an user can enter a
 * particular group
 * 
 * @author Joey George
 * @version 1.0
 * 
 */
@SuppressWarnings("serial")
public class Group implements Serializable {

	/**
	 * ID of the group in database
	 */
	private int id;

	/**
	 * Name of the group
	 */
	private String name;

	/**
	 * Discription of the group
	 */
	private String description;

	/**
	 * Name of the group
	 */
	private String creator;

	/**
	 * Create date of the group
	 */
	private Calendar createDate;


	/**
	 * The group is active or not.
	 */
	private boolean isActive;

	/**
	 * The constructor without parameter.
	 */
	public Group() {
	}

	/**
	 * The constructor of the Group object.
	 * 
	 * @param createDate
	 *            This group's create time.
	 * @param creator
	 *            This group's creator, it is should be a registered user.
	 * @param description
	 *            The description for this group.
	 * @param isActive
	 *            Whether this group is currently active. A newly created group
	 *            is always unactive, and need administrator's grant.
	 * @param name
	 *            The name of this group.
	 * @param subject
	 *            This group's forum subject.
	 */
	public Group(Calendar createDate, String creator, String description,
			boolean isActive, String name) {
		this.createDate = createDate;
		this.creator = creator;
		this.description = description;
		this.isActive = isActive;
		this.name = name;
	}

	/**
	 * Set the id for this group.
	 * 
	 * @param id
	 *            The id which you want to be setted.
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return This group's id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param discription
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the creator
	 */
	public String getCreator() {
		return creator;
	}

	/**
	 * @param creator
	 *            the creator to set
	 */
	public void setCreator(String creator) {
		this.creator = creator;
	}

	/**
	 * @return the createDate
	 */
	public Calendar getCreateDate() {
		return createDate;
	}

	/**
	 * @param createDate
	 *            the createDate to set
	 */
	public void setCreateDate(Calendar createDate) {
		this.createDate = createDate;
	}
	
	/**
	 * @return the isActive
	 */
	public boolean isActive() {
		return isActive;
	}

	/**
	 * @param isActive
	 *            the isActive to set
	 */
	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}
}
